<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <form id="my-form" class="am-form tpl-form-line-form" method="post">
                    <div class="widget-body">
                        <fieldset>
                            <div class="widget-head am-cf">
                                <div class="widget-title am-fl">反馈</div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label"> 所属门店 </label>
                                <div class="am-u-sm-9 am-u-end">

                                    <input type="text" class="tpl-form-input" name="clerk[real_name]"
                                           placeholder="请输入店员姓名" value="<?= $model['shop_name'] ?>" disabled>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label"> 姓名 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="text" class="tpl-form-input" name="clerk[real_name]"
                                           placeholder="请输入店员姓名" value="<?= $model['real_name'] ?>" disabled>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label"> 手机号 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="text" class="tpl-form-input" name="clerk[phone]"
                                           placeholder="请输入手机号" value="<?= $model['phone'] ?>" disabled>
                                </div>
                            </div>
                              <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label"> 描述 </label>
                                <div class="am-u-sm-9 am-u-end">
                                   <textarea disabled=""><?= $model['desc'] ?></textarea>
                                </div>
                            </div>
                               <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 状态 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <label class="am-radio-inline">
                                        <input type="radio" name="clerk[status]" value="1" data-am-ucheck
                                            <?= $model['status'] == 1 ? 'checked' : '' ?> >
                                        有效
                                    </label>
                                    <label class="am-radio-inline">
                                        <input type="radio" name="clerk[status]" value="0" data-am-ucheck
                                            <?= $model['status'] == 2 ? 'checked' : '' ?> >
                                        无效
                                    </label>
                                </div>
                            </div>
                             <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 服务日期 </label>
                                <div class="am-u-sm-9 am-u-end">
                                        <input type="text" name="clerk[yuyue_date]"
                                               class="am-form-field"
                                               value="<?= $model['yuyue_date'] ?>"  placeholder="请选择服务日期"
                                               data-am-datepicker>
                                    </div>
                            </div>
                             <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 服务时间 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="text" class="tpl-form-input" name="clerk[yuyue_time]"
                                           placeholder="请输入时间" value="<?= $model['yuyue_time'] ?>" required>
                                            <small>如：12:00-13:00</small>
                                </div>

                            </div>

                            <div class="am-form-group">
                                <div class="am-u-sm-9 am-u-sm-push-3 am-margin-top-lg">
                                 <input type="hidden" name="clerk[id]" value="<?= $model['id'] ?>" data-am-ucheck
                                            >
                                    <button type="submit" class="j-submit am-btn am-btn-secondary">提交
                                    </button>
                                </div>
                            </div>
                        </fieldset>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<!-- 图片文件列表模板 -->
<script id="tpl-file-item" type="text/template">
    {{ each list }}
    <div class="file-item">
        <a href="{{ $value.file_path }}" title="点击查看大图" target="_blank">
            <img src="{{ $value.file_path }}">
        </a>
        <input type="hidden" name="{{ name }}" value="{{ $value.file_id }}">
        <i class="iconfont icon-shanchu file-item-delete"></i>
    </div>
    {{ /each }}
</script>
<!-- 文件库弹窗 -->
{{include file="layouts/_template/file_library" /}}
<script src="assets/store/js/select.data.js?v=<?= $version ?>"></script>
<script>
    $(function () {

          // 选择图片
        $('.upload-file').selectImages({
            name: 'clerk[logo_image_id]'
        });

        // 选择用户
        $('.j-selectUser').click(function () {
            var $userList = $('.user-list');
            $.selectData({
                title: '选择用户',
                uri: 'user/lists',
                dataIndex: 'user_id',
                done: function (data) {
                    var user = [data[0]];
                    $userList.html(template('tpl-user-item', user));
                }
            });
        });

        /**
         * 表单验证提交
         * @type {*}
         */
        $('#my-form').superForm();

    });
</script>
